<template>
	<view class="cancel-result">
		<!-- 注销顶部内容 -->
		<view class="cancel-result-top">
			<!-- 注销进度图标 -->
			<view class="cancel-result-icon">
				<uni-icons :type="isPending?'refresh-filled':'minus-filled'" size="80rpx"
					:color="isPending?'#FF7803':'#F51F43'"></uni-icons>
			</view>
			<!-- 注销进度状态 -->
			<view class="cancel-result-status">
				{{isPending?'审核中...':'抱歉，账号无法注销'}}
			</view>
			<!-- 注销进度原因 -->
			<view class="cancel-result-because">
				{{isPending?'客服正在审核中，请耐心等待...':'存在交易正在进行'}}
			</view>
		</view>
		<!-- 按钮 -->
		<view :class="isPending?'cancel-result-btn':'cancel-result-btn fail'" @click="clickBtn">
			{{isPending?'撤回申请':'返回首页'}}
		</view>

		<view @click="isPending = true">审核中</view>
		<view @click="isPending = false">无法注销</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// true-审核中
				// false-无法注销
				isPending: true
			}
		},
		methods: {
			clickBtn() {
				if (this.isPending) {
					console.log('审核中-撤回申请')
				} else {
					console.log('无法注销-返回首页')
				}
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #fff;
	}

	.cancel-result {
		text-align: center;

		.cancel-result-top {
			padding: 56rpx 0;

			.cancel-result-status {
				padding-top: 32rpx;

				font-size: 28rpx;
				font-weight: 500;
				color: #FF7803;
			}

			.cancel-result-because {
				font-size: 24rpx;
				color: #999;
				line-height: 80rpx;
			}
		}

		.cancel-result-btn {
			width: 690rpx;
			height: 88rpx;
			margin: 100rpx auto;
			border: 1px solid #FF7803;
			border-radius: 44rpx;
			line-height: 88rpx;
			color: #fff;
			background: #FF7803;

			&.fail {
				border: 1px solid #FF7803;
				background: #fff;
				color: #FF7803;
			}
		}
	}
</style>
